<?php


namespace App\Models\Select;

class UserSelect extends BaseSelect
{
    // 收藏夹
    public const FAVORITES = 'favorites';

    // 笔记
    public const NOTE = 'note';

    // 文章
    public const ARTICLE = 'article';

    // 智囊团
    public const PRO = 'pro';

    // 意见反馈
    public const FEEDBACK = 'feedback';

    // 评论和回复
    public const COMMENT = 'comment';

    // 关注关系列表
    public const RELATIONSHIP = 'relationship';

    // 用户简易信息
    public const SELF_INFO = 'selfInfo';

    // 消息
    public const MESSAGE = 'message';

    // 动态
    public const DYNAMIC = 'dynamic';

    // 沙龙
    public const SALON = 'salon';

    public static function getSelects($scene): array
    {
        $baseSelects = [
            'id',
            'user_id',
            'nickname',
            'avatar',
        ];

        $detailSelects = [
            'id',
            'user_id',
            'identity',
            'nickname',
            'avatar',
            'phone',
            'sign',
            'description',
            'birthday',
            'industry_id',
            'industry_parent_id',
            'job_id',
            'job_parent_id',
            'gender',
            'education_id',
            'province',
            'city',
            'status',
            'is_deleted',
            'created_at',
        ];

        $selects = [
            self::SALON => [
                'id',
                'user_id',
                'nickname',
                'avatar',
                'sign'
            ],
            self::SELF_INFO => [
                'id',
                'identity',
                'user_id',
                'nickname',
                'avatar',
                'status',
                'is_deleted',
                'created_at'
            ],
            self::SELF_DETAIL => $detailSelects,
            self::DYNAMIC => $detailSelects,
        ];
        return $selects[$scene] ?? $baseSelects;
    }
}
